// components/homepage-item/homepage-item.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    enText:{
      type:String,
      value:""
    },
    icText:{
      type: String,
      value: ""
    },
    url:{
      type: String,
      value: ""
    },
    type:{
      type: String,
      value: ""
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    handClick(){
      console.log("1111>>", this.properties.type, this.properties.url)
      let type = this.properties.type
      let url = this.properties.url
      if(type == 'tabBar'){
        wx.switchTab({
          url,
        })
      }else if(type == 'page'){
        wx.navigateTo({
          url,
        })
      }else if(type == 'click'){
        this.triggerEvent("clickAction")
      }
    }
  }
})
